#pragma once

#include <vector>

namespace Maths
{
class Vector3D
{
public:
	typedef std::vector<Vector3D> Vector_t;
	Vector3D(void);
	Vector3D(float x, float y, float z);
	Vector3D(const float* vector);
	~Vector3D(void);

	static const Vector3D ZERO;

	float& X();
	float& Y();
	float& Z();
	
	const float& X() const;
	const float& Y() const;
	const float& Z() const;
	float Magnitude() const;
	float MagnitudeSq() const;
	float Length();
	float LengthSqr();
	Vector3D Inverse() const;
	void Invert();
	void Rotate(Vector3D& angles);
	void Translate(Vector3D& translation);
	void Set(float x, float y, float z);
	Maths::Vector3D Normal() const;
	void Normalize( );
	float Dot( const Vector3D& vec ) const;
	Vector3D Cross( const Vector3D& vec );
	Vector3D asm_Cross( const Vector3D& vec );
	float DistanceSqr( Vector3D &vec2 );
	float Distance( Vector3D &vec2 );

	
	Vector3D& operator= (const Vector3D& vec);
	Vector3D& operator-= (const Vector3D& vec);
	Vector3D& operator+= (const Vector3D& vec);
	Vector3D operator- (const Vector3D& vec) const;
	Vector3D operator+ (const Vector3D& vec) const;
	Vector3D& operator/= (const Vector3D& vec);
	Vector3D& operator*= (const Vector3D& vec);
	Vector3D operator/ (const Vector3D& vec) const;
	Vector3D operator* (const Vector3D& vec) const;
	Vector3D& operator-= (const float& o);
	Vector3D& operator+= (const float& o);
	Vector3D operator- (const float& o) const;
	Vector3D operator+ (const float& o) const;
	Vector3D& operator/= (const float& o);
	Vector3D& operator*= (const float& o);
	Vector3D operator/ (const float& o) const;
	Vector3D operator* (const float& o) const;
	bool operator==(const Vector3D& o) const;
	bool operator!=(const Vector3D& o) const;
	void Zero();

protected:
	float m_X;
	float m_Y;
	float m_Z;
};
};